{"text_format":"1","workbook":"xlsx","n_sheets":3,"sheets":["pivot","data","macro for pivot tables sync"],"not_rendered":{"charts":0,"images":0,"macros":0,"external_links":0,"defined_names":1,"comments":0,"pivot_tables":1},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"pivot","index":0,"n_rows":11,"n_cols":3,"rows_kept":11,"cut":false,"hidden":false,"merged":[]}
[]
[null,"Category","(All)"]
[]
[null,"Row Labels","Average of Value"]
[null,"2015-01-31",27.5]
[null,"2015-02-28",30.5]
[null,"2015-03-31",26.666666666666668]
[null,"2015-04-30",27]
[null,"2015-05-31",46]
[null,"2015-06-30",50]
[null,"Grand Total",31.083333333333332]

{"sheet":"data","index":1,"n_rows":13,"n_cols":4,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
["Category","Subcategory","Date","Value"]
["A","A1","2015-01-31",10]
["A","A1","2015-02-28",14]
["A","A1","2015-03-31",16]
["A","A2","2015-04-30",15]
["B","B1","2015-01-31",45]
["B","B1","2015-02-28",47]
["B","B1","2015-03-31",45]
["B","B1","2015-04-30",45]
["B","B2","2015-05-31",46]
["B","B2","2015-06-30",50]
["C","C1","2015-03-31",19]
["C","C1","2015-04-30",21]

{"sheet":"macro for pivot tables sync","index":2,"n_rows":36,"n_cols":2,"rows_kept":36,"cut":false,"hidden":false,"merged":[]}
[null,"Copy the following code into VBA within Workbook_SheetPivotTableUpdate to keep multiple pivots in sync"]
[]
[null,"Dim ws As Worksheet"]
[null,"Dim pt As PivotTable"]
[null,"Dim pfTarget As PivotField"]
[null,"Dim pf As PivotField"]
[null,"Dim pi As PivotItem"]
[null,"Dim bMI As Boolean"]
[null,"On Error Resume Next"]
[null,"Application.EnableEvents = False"]
[null,"Application.ScreenUpdating = False"]
[null,"For Each pfTarget In Target.PageFields"]
[null,"    bMI = pfTarget.EnableMultiplePageItems"]
[null,"    For Each ws In ThisWorkbook.Worksheets"]
[null,"        For Each pt In ws.PivotTables"]
[null,"            If ws.Name & \"_\" & pt <> ActiveSheet.Name & \"_\" & Target Then"]
[null,"                pt.ManualUpdate = True"]
[null,"                Set pf = pt.PivotFields(pfTarget.Name)"]
[null,"                bMI = pfTarget.EnableMultiplePageItems"]
[null,"                pf.ClearAllFilters"]
[null,"                If bMI = False Then"]
[null,"                    pf.CurrentPage = pfTarget.CurrentPage.Value"]
[null,"                Else"]
[null,"                    pf.CurrentPage = \"(All)\""]
[null,"                    For Each pi In pfTarget.PivotItems"]
[null,"                        pf.PivotItems(pi.Name).Visible = pi.Visible"]
[null,"                    Next pi"]
[null,"                    pf.EnableMultiplePageItems = bMI"]
[null,"                End If"]
[null,"                pt.ManualUpdate = False"]
[null,"            End If"]
[null,"        Next pt"]
[null,"    Next ws"]
[null,"Next pfTarget"]
[null,"Application.EnableEvents = True"]
[null,"Application.ScreenUpdating = True"]